(* This function does not check overflow. If argument is too large, this function will return 0.  *)
let rec factorial n = 
    let rec factorial_helper x acc = 
      if (x <= 1) 
          then acc 
          else (factorial_helper (x-1) (acc * x))
    in 
    factorial_helper n 1
;;
